﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using LotteryAdmin.AdminService;
using System.ServiceModel;
namespace LotteryAdmin
{
    public class WcfProxy
    {
        public WcfProxy(){}
        public static LotteryAdminClient GetProxy
        {
            get
            {
                string url = "http://localhost:3397/LotteryAdmin.svc";
                EndpointAddress address = new EndpointAddress(url);
                BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.None);
                binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
                binding.SendTimeout = new TimeSpan(0, 10, 0);
                binding.MaxReceivedMessageSize = 2147483647;
                binding.OpenTimeout = new TimeSpan(0, 10, 0);
                binding.CloseTimeout = new TimeSpan(0, 10, 0);
                LotteryAdminClient client = new LotteryAdminClient(binding, address);
                return client;
            }
        }
    }
}
